/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.collection.CollUtil
 *  cn.hutool.core.date.DateUtil
 *  cn.hutool.core.util.ObjectUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.beans.value.ChangeListener
 *  javafx.beans.value.ObservableValue
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.Node
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.CheckBox
 *  javafx.scene.control.ChoiceBox
 *  javafx.scene.control.ComboBox
 *  javafx.scene.control.DatePicker
 *  javafx.scene.control.ScrollPane
 *  javafx.scene.control.TableCell
 *  javafx.scene.control.TableColumn
 *  javafx.scene.control.TableView
 *  javafx.scene.control.TextField
 *  javafx.scene.control.cell.PropertyValueFactory
 *  javafx.stage.Modality
 *  javafx.util.Callback
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.util.CollectionUtils
 */
package com.gys.controller.cashPayment;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.gys.GysApplication;
import com.gys.common.business.BankInfoUtil;
import com.gys.common.business.CashPaymentUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.util.CacheUtil;
import com.gys.common.util.CommonUtil;
import com.gys.controller.BaseController;
import com.gys.controller.cashPayment.AddDetailController;
import com.gys.controller.cashPayment.CashPaymentController;
import com.gys.controller.salesReceipts.TipTopController;
import com.gys.data.cashPayment.CashPaymentDetailOutData;
import com.gys.data.cashPayment.CashPaymentDetailTranferOutData;
import com.gys.data.cashPayment.CashPaymentOutData;
import com.gys.data.example.GetLoginStoreOutData;
import com.gys.data.example.GetUserOutData;
import com.gys.data.payingBank.BankInfoInData;
import com.gys.data.saleScheduleSetting.GetSaleScheduleOutData;
import com.gys.data.saleScheduleSetting.GetSaleScheduleQueryInData;
import com.gys.data.user.GetEmpOutData;
import com.gys.data.user.GetLoginOutData;
import com.gys.view.cashPayment.AddDetailView;
import de.felixroske.jfxsupport.FXMLController;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.ComboBox;
import javafx.scene.control.DatePicker;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Modality;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;

@FXMLController
public class AddCashPaymentController
extends BaseController
implements Initializable {
    @FXML
    private TextField gsdhDepositAmt;
    @FXML
    private Button cancelBtn;
    @FXML
    private TableColumn<CashPaymentDetailOutData, String> gsddRmbAmt;
    @FXML
    private TableView<CashPaymentDetailOutData> tableView;
    @FXML
    private Button addBtn;
    @FXML
    private TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> gsddEmp;
    @FXML
    private ComboBox<String> gsdhBankId;
    @FXML
    private TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> gsddEmpGroup;
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private DatePicker gsdhDepositDate;
    @FXML
    private Button delBtn;
    @FXML
    private TableColumn<CashPaymentDetailOutData, CheckBox> checkBox;
    @FXML
    private TextField gsdhDepositId;
    @FXML
    private TextField bankId;
    @FXML
    private TableColumn<CashPaymentDetailOutData, String> gsddSaleDate;
    @FXML
    private Button saveBtn;
    @FXML
    private ComboBox<String> gsdhBankAccount;
    private ObservableList<CashPaymentDetailOutData> detailOutDataList = FXCollections.observableArrayList(new ArrayList());
    @Autowired
    private CashPaymentController cashPaymentController;
    @Autowired
    private TipTopController tipTopController;
    @Autowired
    private AddDetailController addDetailController;

    public void initialize(URL location, ResourceBundle resources) {
        StringConverter converter = CommonUtil.dataPickerFormat("yyyyMMdd");
        this.gsdhDepositDate.setConverter(converter);
        this.bankId.setVisible(false);
        this.gsdhBankId.getItems().addAll(this.getAllBank());
        this.gsdhBankId.converterProperty().set(new StringConverter<String>(){

            public String toString(String object) {
                return object.toString();
            }

            public String fromString(String string) {
                return null;
            }
        });
        this.gsdhBankId.valueProperty().addListener(new ChangeListener(){

            public void changed(ObservableValue observable, Object oldValue, Object newValue) {
                String bankName = (String)AddCashPaymentController.this.gsdhBankId.getValue();
                AddCashPaymentController.this.gsdhBankAccount.getItems().clear();
                AddCashPaymentController.this.gsdhBankAccount.getItems().addAll((Collection)AddCashPaymentController.this.getAllAccount(bankName));
            }
        });
        this.gsdhBankAccount.valueProperty().addListener(new ChangeListener(){

            public void changed(ObservableValue observable, Object oldValue, Object newValue) {
                if (ObjectUtil.isNotEmpty(AddCashPaymentController.this.gsdhBankAccount.getValue())) {
                    String bankAccount = (String)AddCashPaymentController.this.gsdhBankAccount.getValue();
                    BankInfoInData bankInfoInData = new BankInfoInData();
                    bankInfoInData.setGsbsBankAccount(bankAccount);
                    HttpJson rsp = BankInfoUtil.getBankIdByBankAccount(bankInfoInData);
                    List<String> bankIdList = null;
                    if (rsp.isSuccess()) {
                        bankIdList = JSON.parseArray((String)rsp.getMsg(), String.class);
                        if (bankIdList.size() > 0) {
                            for (String ss : bankIdList) {
                                AddCashPaymentController.this.bankId.setText(ss);
                            }
                        }
                    } else {
                        Alert alert = AddCashPaymentController.this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", rsp.getMsg());
                        alert.showAndWait();
                    }
                }
            }
        });
        this.init();
    }

    @Override
    public void init() {
        if (ObjectUtil.isEmpty(this.scrollPane)) {
            return;
        }
        this.gsdhDepositId.clear();
        this.gsdhBankId.setValue(null);
        this.gsdhBankAccount.setValue(null);
        this.gsdhDepositDate.setValue(null);
        this.gsdhDepositAmt.clear();
        this.detailOutDataList.clear();
    }

    @FXML
    void saveCashPayment() {
        String depositId = this.gsdhDepositId.getText().trim();
        String bkId = this.bankId.getText().trim();
        Object bankAccount = this.gsdhBankAccount.getValue();
        Object depositDate = this.gsdhDepositDate.getValue();
        String depositAmt = this.gsdhDepositAmt.getText().trim();
        if (ObjectUtil.isEmpty(depositId)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u586b\u5199\u5b58\u6b3e\u5355\u53f7");
            alert.showAndWait();
            return;
        }
        if (ObjectUtil.isEmpty(bkId)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u5b58\u6b3e\u94f6\u884c");
            alert.showAndWait();
            return;
        }
        if (ObjectUtil.isEmpty(bankAccount)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u5b58\u6b3e\u8d26\u53f7");
            alert.showAndWait();
            return;
        }
        if (ObjectUtil.isEmpty(depositDate)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u586b\u5199\u5b58\u6b3e\u65e5\u671f");
            alert.showAndWait();
            return;
        }
        if (ObjectUtil.isEmpty(depositAmt)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u586b\u5199\u5b58\u6b3e\u91d1\u989d");
            alert.showAndWait();
            return;
        }
        if (this.detailOutDataList.size() == 0) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u6dfb\u52a0\u7f34\u6b3e\u660e\u7ec6\u4fe1\u606f");
            alert.showAndWait();
            return;
        }
        ArrayList<CashPaymentDetailTranferOutData> outDataList = new ArrayList<CashPaymentDetailTranferOutData>();
        double rmbAmt = 0.0;
        for (int i = 0; i < this.detailOutDataList.size(); ++i) {
            Alert alert;
            if (ObjectUtil.isEmpty(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddSaleDate())) {
                alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u586b\u5199\u9500\u552e\u65e5\u671f");
                alert.showAndWait();
                return;
            }
            ((CashPaymentDetailOutData)this.detailOutDataList.get(i)).setGsddSaleDate(DateUtil.format((Date)DateUtil.parse((String)((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddSaleDate().toString()), (String)"yyyyMMdd"));
            if (ObjectUtil.isEmpty(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddEmpGroup())) {
                alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u73ed\u6b21");
                alert.showAndWait();
                return;
            }
            if (ObjectUtil.isEmpty(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddEmp())) {
                alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u6536\u94f6\u5458");
                alert.showAndWait();
                return;
            }
            if (ObjectUtil.isEmpty(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddRmbAmt())) {
                alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u586b\u5199\u73b0\u91d1\u5b9e\u6536\u91d1\u989d");
                alert.showAndWait();
                return;
            }
            rmbAmt += Double.parseDouble(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddRmbAmt());
            CashPaymentDetailTranferOutData outData = new CashPaymentDetailTranferOutData();
            outData.setGsddSaleDate(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddSaleDate());
            outData.setGsddEmpGroup(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddEmpGroup());
            outData.setGsddEmp(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddEmp());
            outData.setGsddRmbAmt(((CashPaymentDetailOutData)this.detailOutDataList.get(i)).getGsddRmbAmt());
            outDataList.add(outData);
        }
        if (Double.parseDouble(depositAmt) != rmbAmt) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5b58\u6b3e\u91d1\u989d\u4e0e\u73b0\u91d1\u5b9e\u6536\u91d1\u989d\u4e0d\u76f8\u7b49");
            alert.showAndWait();
            return;
        }
        CashPaymentOutData inData = new CashPaymentOutData();
        inData.setClientId(((GetUserOutData)CacheUtil.get("logInUser")).getClient());
        inData.setGsdhBrId(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
        inData.setGsdhDepositId(depositId);
        inData.setGsdhBankId(bkId);
        inData.setGsdhBankAccount(((String)bankAccount).trim());
        inData.setGsdhDepositDate(DateUtil.format((Date)DateUtil.parse((String)depositDate.toString()), (String)"yyyyMMdd"));
        inData.setGsdhDepositAmt(depositAmt);
        inData.setDetailOutDataList(outDataList);
        HttpJson httpJson = CashPaymentUtil.insert(inData);
        if (httpJson.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u4fdd\u5b58\u6210\u529f");
            alert.showAndWait();
            this.closeWindow();
            this.cashPaymentController.init();
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    void addAction() {
        this.addDetailController.init();
        GysApplication.showView(AddDetailView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    @FXML
    void delAction() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        List<Integer> indexList = this.getSelectIndex();
        if (ObjectUtil.isEmpty(indexList)) {
            alert.setContentText("\u8bf7\u9009\u62e9\u8bb0\u5f55");
            alert.showAndWait();
            return;
        }
        for (Integer integer : indexList) {
            this.detailOutDataList.remove(integer - 1);
        }
        this.tableView.setItems(this.detailOutDataList);
    }

    @FXML
    private void closeWindow() {
        this.scrollPane.getScene().getWindow().hide();
    }

    @FXML
    public TableView<CashPaymentDetailOutData> addDetail(CashPaymentDetailOutData detail) {
        detail.setIndexDetail(this.detailOutDataList.size() + 1);
        this.detailOutDataList.add(detail);
        this.bingDetailTableCell();
        this.tableView.setItems(this.detailOutDataList);
        return this.tableView;
    }

    private void bingDetailTableCell() {
        this.checkBox.setCellValueFactory(cellData -> ((CashPaymentDetailOutData)cellData.getValue()).getCheckBox().getCustomCheckBox());
        this.checkBox.setCellFactory(col -> {
            TableCell<CashPaymentDetailOutData, CheckBox> cell = new TableCell<CashPaymentDetailOutData, CheckBox>(){

                protected void updateItem(CheckBox item, boolean empty) {
                    super.updateItem(item, empty);
                    this.setGraphic((Node)item);
                    if (item != null) {
                        item.setOnMouseClicked(col -> {
                            if (CollUtil.isEmpty((Collection)AddCashPaymentController.this.detailOutDataList)) {
                                return;
                            }
                            int index = this.getIndex();
                            for (int i = 0; i < AddCashPaymentController.this.detailOutDataList.size(); ++i) {
                                if (i == index) continue;
                                ((CashPaymentDetailOutData)AddCashPaymentController.this.detailOutDataList.get(i)).getCheckBox().setSelectStatus(false);
                            }
                        });
                    }
                }
            };
            return cell;
        });
        this.gsddSaleDate.setCellValueFactory((Callback)new PropertyValueFactory(this.gsddSaleDate.getId()));
        this.gsddEmpGroup.setCellValueFactory((Callback)new PropertyValueFactory(this.gsddEmpGroup.getId()));
        this.gsddEmp.setCellValueFactory((Callback)new PropertyValueFactory(this.gsddEmp.getId()));
        this.gsddRmbAmt.setCellValueFactory((Callback)new PropertyValueFactory(this.gsddRmbAmt.getId()));
        this.tableView.getSelectionModel().selectedItemProperty().addListener((ChangeListener)new ChangeListener<CashPaymentDetailOutData>(){

            public void changed(ObservableValue<? extends CashPaymentDetailOutData> observable, CashPaymentDetailOutData oldValue, CashPaymentDetailOutData newValue) {
                if (CollUtil.isEmpty((Collection)AddCashPaymentController.this.detailOutDataList)) {
                    return;
                }
                for (int i = 0; i < AddCashPaymentController.this.detailOutDataList.size(); ++i) {
                    if (i == newValue.getIndexDetail() - 1) {
                        ((CashPaymentDetailOutData)AddCashPaymentController.this.detailOutDataList.get(i)).getCheckBox().setSelectStatus(true);
                        continue;
                    }
                    ((CashPaymentDetailOutData)AddCashPaymentController.this.detailOutDataList.get(i)).getCheckBox().setSelectStatus(false);
                }
            }
        });
    }

    private List<GetEmpOutData> getAllEmp() {
        GetLoginOutData inData = new GetLoginOutData();
        HttpJson rsp = CashPaymentUtil.empList(inData);
        List outList = null;
        if (rsp.isSuccess()) {
            outList = JSON.parseArray((String)rsp.getMsg(), GetEmpOutData.class);
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", rsp.getMsg());
            alert.showAndWait();
        }
        return outList;
    }

    private List<GetSaleScheduleOutData> getAllEmpGroup() {
        GetSaleScheduleQueryInData inData = new GetSaleScheduleQueryInData();
        HttpJson rsp = CashPaymentUtil.empGroupList(inData);
        List outList = null;
        if (rsp.isSuccess()) {
            outList = JSON.parseArray((String)rsp.getMsg(), GetSaleScheduleOutData.class);
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", rsp.getMsg());
            alert.showAndWait();
        }
        return outList;
    }

    private List<String> getAllBank() {
        BankInfoInData bankInfoInData = new BankInfoInData();
        HttpJson rsp = BankInfoUtil.getBankNames(bankInfoInData);
        List bankList = null;
        if (rsp.isSuccess()) {
            bankList = JSON.parseArray((String)rsp.getMsg(), String.class);
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", rsp.getMsg());
            alert.showAndWait();
        }
        return bankList;
    }

    private List<String> getAllAccount(String bankName) {
        BankInfoInData bankInfoInData = new BankInfoInData();
        bankInfoInData.setGsbsBankName(bankName);
        HttpJson rsp = BankInfoUtil.getAllBankAccountByName(bankInfoInData);
        List bankList = null;
        if (rsp.isSuccess()) {
            bankList = JSON.parseArray((String)rsp.getMsg(), String.class);
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", rsp.getMsg());
            alert.showAndWait();
        }
        return bankList;
    }

    private List<Integer> getSelectIndex() {
        ArrayList<Integer> ids = new ArrayList<Integer>();
        if (!CollectionUtils.isEmpty(this.detailOutDataList)) {
            for (CashPaymentDetailOutData i : this.detailOutDataList) {
                if (!i.getCheckBox().isSelected().booleanValue()) continue;
                ids.add(i.getIndexDetail());
            }
        }
        return ids;
    }

    public TextField getGsdhDepositAmt() {
        return this.gsdhDepositAmt;
    }

    public Button getCancelBtn() {
        return this.cancelBtn;
    }

    public TableColumn<CashPaymentDetailOutData, String> getGsddRmbAmt() {
        return this.gsddRmbAmt;
    }

    public TableView<CashPaymentDetailOutData> getTableView() {
        return this.tableView;
    }

    public Button getAddBtn() {
        return this.addBtn;
    }

    public TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> getGsddEmp() {
        return this.gsddEmp;
    }

    public ComboBox<String> getGsdhBankId() {
        return this.gsdhBankId;
    }

    public TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> getGsddEmpGroup() {
        return this.gsddEmpGroup;
    }

    public ScrollPane getScrollPane() {
        return this.scrollPane;
    }

    public DatePicker getGsdhDepositDate() {
        return this.gsdhDepositDate;
    }

    public Button getDelBtn() {
        return this.delBtn;
    }

    public TableColumn<CashPaymentDetailOutData, CheckBox> getCheckBox() {
        return this.checkBox;
    }

    public TextField getGsdhDepositId() {
        return this.gsdhDepositId;
    }

    public TextField getBankId() {
        return this.bankId;
    }

    public TableColumn<CashPaymentDetailOutData, String> getGsddSaleDate() {
        return this.gsddSaleDate;
    }

    public Button getSaveBtn() {
        return this.saveBtn;
    }

    public ComboBox<String> getGsdhBankAccount() {
        return this.gsdhBankAccount;
    }

    public ObservableList<CashPaymentDetailOutData> getDetailOutDataList() {
        return this.detailOutDataList;
    }

    public CashPaymentController getCashPaymentController() {
        return this.cashPaymentController;
    }

    public TipTopController getTipTopController() {
        return this.tipTopController;
    }

    public AddDetailController getAddDetailController() {
        return this.addDetailController;
    }

    public void setGsdhDepositAmt(TextField gsdhDepositAmt) {
        this.gsdhDepositAmt = gsdhDepositAmt;
    }

    public void setCancelBtn(Button cancelBtn) {
        this.cancelBtn = cancelBtn;
    }

    public void setGsddRmbAmt(TableColumn<CashPaymentDetailOutData, String> gsddRmbAmt) {
        this.gsddRmbAmt = gsddRmbAmt;
    }

    public void setTableView(TableView<CashPaymentDetailOutData> tableView) {
        this.tableView = tableView;
    }

    public void setAddBtn(Button addBtn) {
        this.addBtn = addBtn;
    }

    public void setGsddEmp(TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> gsddEmp) {
        this.gsddEmp = gsddEmp;
    }

    public void setGsdhBankId(ComboBox<String> gsdhBankId) {
        this.gsdhBankId = gsdhBankId;
    }

    public void setGsddEmpGroup(TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> gsddEmpGroup) {
        this.gsddEmpGroup = gsddEmpGroup;
    }

    public void setScrollPane(ScrollPane scrollPane) {
        this.scrollPane = scrollPane;
    }

    public void setGsdhDepositDate(DatePicker gsdhDepositDate) {
        this.gsdhDepositDate = gsdhDepositDate;
    }

    public void setDelBtn(Button delBtn) {
        this.delBtn = delBtn;
    }

    public void setCheckBox(TableColumn<CashPaymentDetailOutData, CheckBox> checkBox) {
        this.checkBox = checkBox;
    }

    public void setGsdhDepositId(TextField gsdhDepositId) {
        this.gsdhDepositId = gsdhDepositId;
    }

    public void setBankId(TextField bankId) {
        this.bankId = bankId;
    }

    public void setGsddSaleDate(TableColumn<CashPaymentDetailOutData, String> gsddSaleDate) {
        this.gsddSaleDate = gsddSaleDate;
    }

    public void setSaveBtn(Button saveBtn) {
        this.saveBtn = saveBtn;
    }

    public void setGsdhBankAccount(ComboBox<String> gsdhBankAccount) {
        this.gsdhBankAccount = gsdhBankAccount;
    }

    public void setDetailOutDataList(ObservableList<CashPaymentDetailOutData> detailOutDataList) {
        this.detailOutDataList = detailOutDataList;
    }

    public void setCashPaymentController(CashPaymentController cashPaymentController) {
        this.cashPaymentController = cashPaymentController;
    }

    public void setTipTopController(TipTopController tipTopController) {
        this.tipTopController = tipTopController;
    }

    public void setAddDetailController(AddDetailController addDetailController) {
        this.addDetailController = addDetailController;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof AddCashPaymentController)) {
            return false;
        }
        AddCashPaymentController other = (AddCashPaymentController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        TextField this$gsdhDepositAmt = this.getGsdhDepositAmt();
        TextField other$gsdhDepositAmt = other.getGsdhDepositAmt();
        if (this$gsdhDepositAmt == null ? other$gsdhDepositAmt != null : !this$gsdhDepositAmt.equals(other$gsdhDepositAmt)) {
            return false;
        }
        Button this$cancelBtn = this.getCancelBtn();
        Button other$cancelBtn = other.getCancelBtn();
        if (this$cancelBtn == null ? other$cancelBtn != null : !this$cancelBtn.equals(other$cancelBtn)) {
            return false;
        }
        TableColumn<CashPaymentDetailOutData, String> this$gsddRmbAmt = this.getGsddRmbAmt();
        TableColumn<CashPaymentDetailOutData, String> other$gsddRmbAmt = other.getGsddRmbAmt();
        if (this$gsddRmbAmt == null ? other$gsddRmbAmt != null : !this$gsddRmbAmt.equals(other$gsddRmbAmt)) {
            return false;
        }
        TableView<CashPaymentDetailOutData> this$tableView = this.getTableView();
        TableView<CashPaymentDetailOutData> other$tableView = other.getTableView();
        if (this$tableView == null ? other$tableView != null : !this$tableView.equals(other$tableView)) {
            return false;
        }
        Button this$addBtn = this.getAddBtn();
        Button other$addBtn = other.getAddBtn();
        if (this$addBtn == null ? other$addBtn != null : !this$addBtn.equals(other$addBtn)) {
            return false;
        }
        TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> this$gsddEmp = this.getGsddEmp();
        TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> other$gsddEmp = other.getGsddEmp();
        if (this$gsddEmp == null ? other$gsddEmp != null : !this$gsddEmp.equals(other$gsddEmp)) {
            return false;
        }
        ComboBox<String> this$gsdhBankId = this.getGsdhBankId();
        ComboBox<String> other$gsdhBankId = other.getGsdhBankId();
        if (this$gsdhBankId == null ? other$gsdhBankId != null : !this$gsdhBankId.equals(other$gsdhBankId)) {
            return false;
        }
        TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> this$gsddEmpGroup = this.getGsddEmpGroup();
        TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> other$gsddEmpGroup = other.getGsddEmpGroup();
        if (this$gsddEmpGroup == null ? other$gsddEmpGroup != null : !this$gsddEmpGroup.equals(other$gsddEmpGroup)) {
            return false;
        }
        ScrollPane this$scrollPane = this.getScrollPane();
        ScrollPane other$scrollPane = other.getScrollPane();
        if (this$scrollPane == null ? other$scrollPane != null : !this$scrollPane.equals(other$scrollPane)) {
            return false;
        }
        DatePicker this$gsdhDepositDate = this.getGsdhDepositDate();
        DatePicker other$gsdhDepositDate = other.getGsdhDepositDate();
        if (this$gsdhDepositDate == null ? other$gsdhDepositDate != null : !this$gsdhDepositDate.equals(other$gsdhDepositDate)) {
            return false;
        }
        Button this$delBtn = this.getDelBtn();
        Button other$delBtn = other.getDelBtn();
        if (this$delBtn == null ? other$delBtn != null : !this$delBtn.equals(other$delBtn)) {
            return false;
        }
        TableColumn<CashPaymentDetailOutData, CheckBox> this$checkBox = this.getCheckBox();
        TableColumn<CashPaymentDetailOutData, CheckBox> other$checkBox = other.getCheckBox();
        if (this$checkBox == null ? other$checkBox != null : !this$checkBox.equals(other$checkBox)) {
            return false;
        }
        TextField this$gsdhDepositId = this.getGsdhDepositId();
        TextField other$gsdhDepositId = other.getGsdhDepositId();
        if (this$gsdhDepositId == null ? other$gsdhDepositId != null : !this$gsdhDepositId.equals(other$gsdhDepositId)) {
            return false;
        }
        TextField this$bankId = this.getBankId();
        TextField other$bankId = other.getBankId();
        if (this$bankId == null ? other$bankId != null : !this$bankId.equals(other$bankId)) {
            return false;
        }
        TableColumn<CashPaymentDetailOutData, String> this$gsddSaleDate = this.getGsddSaleDate();
        TableColumn<CashPaymentDetailOutData, String> other$gsddSaleDate = other.getGsddSaleDate();
        if (this$gsddSaleDate == null ? other$gsddSaleDate != null : !this$gsddSaleDate.equals(other$gsddSaleDate)) {
            return false;
        }
        Button this$saveBtn = this.getSaveBtn();
        Button other$saveBtn = other.getSaveBtn();
        if (this$saveBtn == null ? other$saveBtn != null : !this$saveBtn.equals(other$saveBtn)) {
            return false;
        }
        ComboBox<String> this$gsdhBankAccount = this.getGsdhBankAccount();
        ComboBox<String> other$gsdhBankAccount = other.getGsdhBankAccount();
        if (this$gsdhBankAccount == null ? other$gsdhBankAccount != null : !this$gsdhBankAccount.equals(other$gsdhBankAccount)) {
            return false;
        }
        ObservableList<CashPaymentDetailOutData> this$detailOutDataList = this.getDetailOutDataList();
        ObservableList<CashPaymentDetailOutData> other$detailOutDataList = other.getDetailOutDataList();
        if (this$detailOutDataList == null ? other$detailOutDataList != null : !this$detailOutDataList.equals(other$detailOutDataList)) {
            return false;
        }
        CashPaymentController this$cashPaymentController = this.getCashPaymentController();
        CashPaymentController other$cashPaymentController = other.getCashPaymentController();
        if (this$cashPaymentController == null ? other$cashPaymentController != null : !(this$cashPaymentController).equals(other$cashPaymentController)) {
            return false;
        }
        TipTopController this$tipTopController = this.getTipTopController();
        TipTopController other$tipTopController = other.getTipTopController();
        if (this$tipTopController == null ? other$tipTopController != null : !(this$tipTopController).equals(other$tipTopController)) {
            return false;
        }
        AddDetailController this$addDetailController = this.getAddDetailController();
        AddDetailController other$addDetailController = other.getAddDetailController();
        return !(this$addDetailController == null ? other$addDetailController != null : !(this$addDetailController).equals(other$addDetailController));
    }

    protected boolean canEqual(Object other) {
        return other instanceof AddCashPaymentController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        TextField $gsdhDepositAmt = this.getGsdhDepositAmt();
        result = result * 59 + ($gsdhDepositAmt == null ? 43 : $gsdhDepositAmt.hashCode());
        Button $cancelBtn = this.getCancelBtn();
        result = result * 59 + ($cancelBtn == null ? 43 : $cancelBtn.hashCode());
        TableColumn<CashPaymentDetailOutData, String> $gsddRmbAmt = this.getGsddRmbAmt();
        result = result * 59 + ($gsddRmbAmt == null ? 43 : $gsddRmbAmt.hashCode());
        TableView<CashPaymentDetailOutData> $tableView = this.getTableView();
        result = result * 59 + ($tableView == null ? 43 : $tableView.hashCode());
        Button $addBtn = this.getAddBtn();
        result = result * 59 + ($addBtn == null ? 43 : $addBtn.hashCode());
        TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> $gsddEmp = this.getGsddEmp();
        result = result * 59 + ($gsddEmp == null ? 43 : $gsddEmp.hashCode());
        ComboBox<String> $gsdhBankId = this.getGsdhBankId();
        result = result * 59 + ($gsdhBankId == null ? 43 : $gsdhBankId.hashCode());
        TableColumn<CashPaymentDetailOutData, ChoiceBox<String>> $gsddEmpGroup = this.getGsddEmpGroup();
        result = result * 59 + ($gsddEmpGroup == null ? 43 : $gsddEmpGroup.hashCode());
        ScrollPane $scrollPane = this.getScrollPane();
        result = result * 59 + ($scrollPane == null ? 43 : $scrollPane.hashCode());
        DatePicker $gsdhDepositDate = this.getGsdhDepositDate();
        result = result * 59 + ($gsdhDepositDate == null ? 43 : $gsdhDepositDate.hashCode());
        Button $delBtn = this.getDelBtn();
        result = result * 59 + ($delBtn == null ? 43 : $delBtn.hashCode());
        TableColumn<CashPaymentDetailOutData, CheckBox> $checkBox = this.getCheckBox();
        result = result * 59 + ($checkBox == null ? 43 : $checkBox.hashCode());
        TextField $gsdhDepositId = this.getGsdhDepositId();
        result = result * 59 + ($gsdhDepositId == null ? 43 : $gsdhDepositId.hashCode());
        TextField $bankId = this.getBankId();
        result = result * 59 + ($bankId == null ? 43 : $bankId.hashCode());
        TableColumn<CashPaymentDetailOutData, String> $gsddSaleDate = this.getGsddSaleDate();
        result = result * 59 + ($gsddSaleDate == null ? 43 : $gsddSaleDate.hashCode());
        Button $saveBtn = this.getSaveBtn();
        result = result * 59 + ($saveBtn == null ? 43 : $saveBtn.hashCode());
        ComboBox<String> $gsdhBankAccount = this.getGsdhBankAccount();
        result = result * 59 + ($gsdhBankAccount == null ? 43 : $gsdhBankAccount.hashCode());
        ObservableList<CashPaymentDetailOutData> $detailOutDataList = this.getDetailOutDataList();
        result = result * 59 + ($detailOutDataList == null ? 43 : $detailOutDataList.hashCode());
        CashPaymentController $cashPaymentController = this.getCashPaymentController();
        result = result * 59 + ($cashPaymentController == null ? 43 : ($cashPaymentController).hashCode());
        TipTopController $tipTopController = this.getTipTopController();
        result = result * 59 + ($tipTopController == null ? 43 : ($tipTopController).hashCode());
        AddDetailController $addDetailController = this.getAddDetailController();
        result = result * 59 + ($addDetailController == null ? 43 : ($addDetailController).hashCode());
        return result;
    }

    public String toString() {
        return "AddCashPaymentController(gsdhDepositAmt=" + this.getGsdhDepositAmt() + ", cancelBtn=" + this.getCancelBtn() + ", gsddRmbAmt=" + this.getGsddRmbAmt() + ", tableView=" + this.getTableView() + ", addBtn=" + this.getAddBtn() + ", gsddEmp=" + this.getGsddEmp() + ", gsdhBankId=" + this.getGsdhBankId() + ", gsddEmpGroup=" + this.getGsddEmpGroup() + ", scrollPane=" + this.getScrollPane() + ", gsdhDepositDate=" + this.getGsdhDepositDate() + ", delBtn=" + this.getDelBtn() + ", checkBox=" + this.getCheckBox() + ", gsdhDepositId=" + this.getGsdhDepositId() + ", bankId=" + this.getBankId() + ", gsddSaleDate=" + this.getGsddSaleDate() + ", saveBtn=" + this.getSaveBtn() + ", gsdhBankAccount=" + this.getGsdhBankAccount() + ", detailOutDataList=" + this.getDetailOutDataList() + ", cashPaymentController=" + this.getCashPaymentController() + ", tipTopController=" + this.getTipTopController() + ", addDetailController=" + this.getAddDetailController() + ")";
    }
}

